﻿package plugin.superstore
{
    import com.core.*;
    import com.sh.game.consts.*;
    import com.sh.game.global.*;
    import plugin.store.*;
    import plugin.superstore.game.*;
    import view.*;

    public class XunBaoShop extends FlashUIBase
    {
        private var _ui:XunBaoShopGame;

        public function XunBaoShop()
        {
            return;
        }// end function

        override protected function preLoaderInit() : void
        {
            super.preLoaderInit();
            appendLoader(Config.getUrl("assets/images/mornui/common.swf", ResourceType.NORMAL));
            appendLoader(Config.getUrl("assets/images/mornui/jifenshop.swf", ResourceType.NORMAL));
            return;
        }// end function

        override protected function initGUI() : void
        {
            this._ui = new XunBaoShopGame(this);
            mGUI = this._ui;
            return;
        }// end function

        override protected function openRefresh() : void
        {
            ModelProxy.change("data", "xunbaoshopIsOpen", true);
            ModelProxy.change("mainui", "showEffect", {ab:"xunbaoshop", state:false});
            if (this._ui.showType != int(data))
            {
                this._ui.showType = int(data);
                this._ui.init();
            }
            StoreSender._1getStoreInfo();
            return;
        }// end function

        override protected function closeComplete() : void
        {
            super.closeComplete();
            ModelProxy.change("data", "xunbaoshopIsOpen", false);
            ModelProxy.change("mainui", "checkXunbaoShop", null);
            return;
        }// end function

    }
}
